#include <iostream>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;
struct BigInt {
    vector<int> digits;
    BigInt(const string& str) {
        for (int i = str.size() - 1; i >= 0; --i) {
            digits.push_back(str[i] - '0');
        }
    }
    BigInt() {}void print() const {
        for (int i = digits.size() - 1; i >= 0; --i) {
            cout << digits[i];
        }cout << endl;
    }
    BigInt operator+(const BigInt& other) const {
        BigInt result;int carry = 0;
        int size = max(digits.size(), other.digits.size());
        for (int i = 0; i < size || carry; ++i) {
            int sum = carry;
            if (i < digits.size()) sum += digits[i];
            if (i < other.digits.size()) sum += other.digits[i];
            result.digits.push_back(sum % 10);
            carry = sum / 10;
        }
        return result;
    }
    BigInt operator-(const BigInt& other) const {
        BigInt result;int borrow = 0;
        for (int i = 0; i < digits.size(); ++i) {
            int diff = digits[i] - borrow;
            if (i < other.digits.size()) diff -= other.digits[i];
            if (diff < 0) { diff += 10;borrow = 1; } else { borrow = 0; }
            result.digits.push_back(diff);
        }
        while (result.digits.size() > 1 && result.digits.back() == 0) {
            result.digits.pop_back();
        }
        return result;
    }
    BigInt operator*(const BigInt& other) const {
        BigInt result;
        result.digits.resize(digits.size() + other.digits.size(), 0);
        for (int i = 0; i < digits.size(); ++i) {
            int carry = 0;
            for (int j = 0; j < other.digits.size() || carry; ++j) {
                int product = result.digits[i + j] + digits[i] *
                    (j < other.digits.size() ? other.digits[j] : 0) + carry;
                result.digits[i + j] = product % 10;
                carry = product / 10;
            }
        }while (result.digits.size() > 1 && result.digits.back() == 0) {
            result.digits.pop_back();
        }
        return result;
    }
    BigInt operator/(const BigInt& other) const {
        BigInt result;BigInt dividend = *this;
        BigInt divisor = other;
        if (*this < other) { return BigInt("0"); }
        BigInt temp("0");
        for (int i = digits.size() - 1; i >= 0; --i) {
            temp.digits.insert(temp.digits.begin(), digits[i]);
            int q = 0;
            while (temp >= divisor) { temp = temp - divisor;q++; }
            result.digits.insert(result.digits.begin(), q);
        }
        while (result.digits.size() > 1 && result.digits.back() == 0) {
            result.digits.pop_back();
        }
        return result;
    }
    bool operator<(const BigInt& other) const {
        if (digits.size() != other.digits.size()) {
            return digits.size() < other.digits.size();
        }
        for (int i = digits.size() - 1; i >= 0; --i)
            if (digits[i] != other.digits[i]) {
                return digits[i] < other.digits[i];
            }
        return false;
    }
    bool operator>=(const BigInt& other) const { return !(*this < other); }
};
//定义 BigInt a=("..string类型..."),b=("...string类型.."),c;
// c=a+b
// c.print()